package cn.gson.school.entity.jiuye;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 面试资料表
 * 
 * @author 华少
 *
 */

@Entity
@Table(name = "tb_jy_interview_materials")
public class InterviewMaterialsEntity {
	/**
	 * interview_materials_id 面试资料编号
	 *  interview_id 面试记录编号
	 *   retest_id 复试编号
	 * interview_materials_question 面试问题
	 *  interview_materials_answer 答案
	 * Interview_question_type 问题类型 
	 * interview_materials_time 时间
	 * interview_materials_experience 是否添加为经验
	 */
	@Id
	@Column(name = "interview_materials_id")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long interviewMaterialsId;

	@ManyToOne
	@JoinColumn(name = "interview_id")
	private InterviewRecordEntity interviewId;// 面试记录

	@ManyToOne
	@JoinColumn(name = "retest_id")
	private RetestEntity retestId;// 复试表

	@Column(name = "interview_materials_question")
	private String interviewMaterialsQuestion;

	@Column(name = "interview_materials_answer")
	private String interviewMaterialsAnswer;

	@Column(name = "interview_question_type")
	private String interviewQuestionType;

	@Column(name = "interview_materials_time")
	@JsonFormat(pattern="yyyy-MM-ddHH:mm:ss")
	private Date interviewMaterialsTime;
	
	@Column(name = "interview_materials_experience")
	private Integer interviewMaterialsExperience;
	
	public Long getInterviewMaterialsId() {
		return interviewMaterialsId;
	}

	public void setInterviewMaterialsId(Long interviewMaterialsId) {
		this.interviewMaterialsId = interviewMaterialsId;
	}

	public InterviewRecordEntity getInterviewId() {
		return interviewId;
	}

	public void setInterviewId(InterviewRecordEntity interviewId) {
		this.interviewId = interviewId;
	}

	public RetestEntity getRetestId() {
		return retestId;
	}

	public void setRetestId(RetestEntity retestId) {
		this.retestId = retestId;
	}

	public String getInterviewMaterialsQuestion() {
		return interviewMaterialsQuestion;
	}

	public void setInterviewMaterialsQuestion(String interviewMaterialsQuestion) {
		this.interviewMaterialsQuestion = interviewMaterialsQuestion;
	}

	public String getInterviewMaterialsAnswer() {
		return interviewMaterialsAnswer;
	}

	public void setInterviewMaterialsAnswer(String interviewMaterialsAnswer) {
		this.interviewMaterialsAnswer = interviewMaterialsAnswer;
	}


	public String getInterviewQuestionType() {
		return interviewQuestionType;
	}

	public void setInterviewQuestionType(String interviewQuestionType) {
		this.interviewQuestionType = interviewQuestionType;
	}

	public Date getInterviewMaterialsTime() {
		return interviewMaterialsTime;
	}

	public void setInterviewMaterialsTime(Date interviewMaterialsTime) {
		this.interviewMaterialsTime = interviewMaterialsTime;
	}

	
	public Integer getInterviewMaterialsExperience() {
		return interviewMaterialsExperience;
	}

	public void setInterviewMaterialsExperience(Integer interviewMaterialsExperience) {
		this.interviewMaterialsExperience = interviewMaterialsExperience;
	}

	@Override
	public String toString() {
		return "InterviewMaterialsEntity [interviewMaterialsId=" + interviewMaterialsId + ", interviewId=" + interviewId
				+ ", retestId=" + retestId + ", interviewMaterialsQuestion=" + interviewMaterialsQuestion
				+ ", interviewMaterialsAnswer=" + interviewMaterialsAnswer + ", interviewQuestionType="
				+ interviewQuestionType + ", interviewMaterialsTime=" + interviewMaterialsTime
				+ ", interviewMaterialsExperience=" + interviewMaterialsExperience + "]";
	}

	
}
